const app = getApp()
import util from "../../utils/util.js";
import json from '../../assets/jobs.js'
Page({
	data: {
		isIphoneX: app.globalData.isIphoneX,
		size: 2,
		listData: [],
		teamlist: [],
	},
	onLoad: function () {
		let colorArr = []
		let listData = []
    let temp = json.json
		for (let i = 0; i < temp.length; i++) {
			colorArr.push(util.color())
		}
		temp.forEach((item, index) => {
      console.log(item)
      item.name = item.name.length > 5 ? item.name.substring(0, 5) + '...': item.name
			listData.push({
				id: index,
				title: item,
				color: colorArr[index],
			})
		});
		this.setData({
			listData,
		})
	},
	onShow: function () {},
})